﻿using System;
using System.Web.Mvc;

namespace Wheels.Controllers
{
    [HandleError]
    public class HomeController : Controller
    {
        protected override void OnActionExecuting(ActionExecutingContext filterContext)
        {
            if (Request.Params.Get("_height") != null &&
                Request.Params.Get("_width") != null)
            {
                int height, width;
                Int32.TryParse(Request.Params.Get("_height"), out height);
                Int32.TryParse(Request.Params.Get("_width"), out width);

                Session["map_height"] = height;
                Session["map_width"] = width;
            }

            base.OnActionExecuting(filterContext);
        }

        public ActionResult Index()
        {
            return View(Client);
        }

        public ActionResult Start()
        {
            return View(Client);
        }

        public ActionResult BingMap()
        {
            return View();
        }

        public ActionResult ViewPage1()
        {
            return View();
        }

        public ActionResult MainMenu()
        {
            return View();
        }

        public ActionResult Main()
        {
            return View();
        }
    }
}